package com.euc.springbootframework.entity;

import com.google.common.collect.Sets;
import org.springframework.data.mongodb.core.mapping.Document;


import java.io.Serializable;
import java.util.Set;

@Document(collection = "role")
public class Role extends AuditBaseEntity implements Serializable{

    private String name;

    private String description;

    private Set<Function> functions = Sets.newHashSet();

    private Set<User> users = Sets.newHashSet();

    public Role() {
    }

    public Role(String id) {
        this.setId(id);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Set<Function> getFunctions() {
        return functions;
    }

    public void setFunctions(Set<Function> functions) {
        this.functions = functions;
    }

    public Set<User> getUsers() {
        return users;
    }

    public void setUsers(Set<User> users) {
        this.users = users;
    }

}
